package com.example.ribbon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class HelloService {
    @Autowired RestTemplate restTemplate;


    //调用 config-client（任意一个服务） 的接口
    public String getHelloContent() {
//        return restTemplate.getForObject("http://SERVICE-HELLOWORLD/",String.class);
        return restTemplate.getForObject("http://config-client/hello",String.class);
    }
}